<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterSystemMenuAddIsMenu extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('system_menu', function (Blueprint $table) {
            // 添加字段 判断是否是菜单 1：是，0：不是
            $table->tinyInteger('is_menu')->after('status')->nullable()->comment('是否是菜单');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('system_menu', function (Blueprint $table) {
            //
            $table->dropColumn('is_menu');
        });
    }
}
